package com.billdowney.service.impl.media;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.billdowney.dao.file.FileInfoDao;
import com.billdowney.entity.file.FileInfo;
import com.billdowney.service.impl.base.BaseServiceImpl;
import com.billdowney.service.interfaces.file.FileInfoService;
import com.billdowney.service.interfaces.media.VideoService;

/**
 * @ClassName: VideoServiceImpl
 * @Description: 视频处理接口实现
 * @author 超级小富翁 - BillDowney
 * @date 2018年7月31日 下午4:05:26
 */
@Service
public class VideoServiceImpl extends BaseServiceImpl<FileInfoDao, FileInfo, String> implements VideoService {

	@Autowired
	private FileInfoService fileInfoService;

	@Resource(type = FileInfoDao.class)
	@Override
	public void setDao(FileInfoDao dao) {
		super.dao = dao;
	}

	@Override
	public void getVideoFileByFileId(String id, HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		fileInfoService.fileDownloadById(id, request, response);
	}

}
